#coding=utf-8
from api import test_report
from datetime import datetime
import time
# report_cases = {
# 	'all_cases':[['WEB理财', '1', '登录', 'login', 'post', 'pass', '详细', 'asd'],['WEB理财', '2', '产品列表', 'list', 'post', 'error', '详细', 'asd']],
# 	'pass_cases':[['WEB理财', '1', '登录', 'login', 'post', 'pass', '详细', 'asd']],
# 	'error_cases':[['WEB理财', '2', '产品列表', 'list', 'post', 'error', '详细', 'asd']],
# 	'failed_cases':[['WEB理财', '3', '测试', 'login', 'post', '/', '详细', 'asd']]
# }
# #"D:/test_demo.html"
#
# report_cases={
# 'all_cases': [[None, 0, '查询手机号', '/cc/json/mobile_tel_segment.htm', 'Get', 'Pass', '详细', "__GetZoneResult_ = {\n mts:'1366926',\n province:'陕西',\n catName:'中国移动',\n telString:'13669269525',\n\tareaVid:'30503',\n\tispVid:'3236139',\n\tcarrier:'陕西移动'\n}\n"], [None, 1, '查询手机号2', '/cc/json/mobile_tel_segment.htm', 'Get', 'Pass', '详细', "__GetZoneResult_ = {\n mts:'1366926',\n province:'陕西',\n catName:'中国移动',\n telString:'13669269528',\n\tareaVid:'30503',\n\tispVid:'3236139',\n\tcarrier:'陕西移动'\n}\n"]],
# 'pass_cases': [[None, 0, '查询手机号', '/cc/json/mobile_tel_segment.htm', 'Get', 'Pass', '详细', "__GetZoneResult_ = {\n mts:'1366926',\n province:'陕西',\n catName:'中国移动',\n telString:'13669269525',\n\tareaVid:'30503',\n\tispVid:'3236139',\n\tcarrier:'陕西移动'\n}\n"], [None, 1, '查询手机号2', '/cc/json/mobile_tel_segment.htm', 'Get', 'Pass', '详细', "__GetZoneResult_ = {\n mts:'1366926',\n province:'陕西',\n catName:'中国移动',\n telString:'13669269528',\n\tareaVid:'30503',\n\tispVid:'3236139',\n\tcarrier:'陕西移动'\n}\n"]],
# 'error_cases': [],
# 'failed_cases': []
# }
#
# test_report.HTML_REPORT( html_title='html_title',
# 	pie_theme='pie_theme',
# 	test_info=['2016-12-02 15:59:17', '2016-12-02 16:10:22', '11 分 4 秒',1, 2, 3],
# 	report_table_title=['项目名称', '用例编号', '用例名称', '接口地址', '接口方法', '测试结果', '详细信息'],
# 	report_cases=report_cases).creat_report(dir="D:/test_demo.html")


tt='{:.2%}'.format(42 / 50)
print(tt)